	<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>资料管理员信息管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#messageBox").show();
			
			$("#userDeptDepcode").removeClass('required');
			$("#userId").focus();
			$("#inputForm").validate();
			
			$('#userId').blur(function(){
				var userId = $('#userId').val();
				//判断是否存在
		         $("#userName").val('');
				if(userId != ''){
					//Ajax 根据域账号获取用户名信息
					$.ajax({
						type : 'POST',
						url : '${ctx}/sys/user/getById',
						data : {
							"id" : userId
						},
						success : function(data) {
							if (data.name) {
								$("#userName").val(data.name);
							} else {
								top.$.jBox.tip('没有找到相关用户信息！');
							}
						}
					});
				}

			});
			if('${rtnCode}'=='0'){//关闭当前
				top.$.jBox.close();
			}
		});
	</script>
</head>
<body>
<div class="seachList-top">
	<br/>
	<form:form id="inputForm" modelAttribute="userMatch" action="${ctx}/sys/userMatch/save" method="post" class="form-horizontal">
		<form:hidden path="id"/>
		<sys:message content="${message}"/>
		
		<div class="control-group">
			<label class="control-label" for="name"><font color="red" class="requiredSymbol">*</font>域用户:</label>
			<div class="controls">
				<form:input path="userId" htmlEscape="false" maxlength="50" class="required"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label" for="userName"><font color="red" class="requiredSymbol">*</font>姓名:</label>
			<div class="controls">
				<form:input path="userName" htmlEscape="false" maxlength="50" class="required" readonly="readonly"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label" for="userDept"><font color="red" class="requiredSymbol">*</font>部门:</label>
			<div class="controls designerDept">
			<sys:treeselect id="office" name="userDept" value="${userMatch.userDept}" labelName="userDeptName" labelValue="${userMatch.userDeptName}" 
				title="部门" url="/sys/office/treeData?type=2" cssClass="input-small" allowClear="true" notAllowSelectParent="true"/></li>
			</div>
		</div>
		<div class="form-actions">
				<input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;
		</div>
	</form:form>
</div>
</body>
</html>
